﻿package hunterCommonlib.link 
{
	
	/**
	 * ...
	 * @author ...
	 */
	public class DLink 
	{
		private var _head:DLinkNode;
		private var _tail:DLinkNode;
		public function DLink() 
		{
			_head = _tail = null;
		}
		public function get length():uint {
			if (_head == null) {
				return 0;
			}
			return _head.length;
		}
		public function insertHead(node:DLinkNode) {
			if (_head == null) {
				_head = node;
				return
			}
			_head.insertPrev(node);
		}
		public function insetTail(node:DLinkNode):void {
			if (_tail == null) {
				_tail = node;
				return;
			}
			_tail.insertNext(node);
		}
		public function insertAt(index:int):Boolean {
			if (index < 0) {
				return true;
			}else {
				return true;
			}
		}
	}
	
}